package com.example.controller;

import com.example.pojo.Menu;
import com.example.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class MenuController {
    @Resource
    private MenuService menuService;

    @GetMapping("/menuList")
    public List<Menu> menuList(){ return menuService.menuList(); }

    @GetMapping("/typeMenuList")
    public List<Menu> typeMenuList(){ return menuService.typeMenuList(); }

    @GetMapping("/typeButtonList")
    public List<Menu> typeButtonList(){ return menuService.typeButtonList(); }

    @GetMapping("/queryMenuTree")
    public List<Menu> queryMenuTree(){ return menuService.queryMenuTree(); }
}
